FROM jenkins/jenkins:alpine
USER root
RUN mkdir /data/ansible /data/package -p

VOLUME [ "/data" ]

RUN apk update && apk --no-cache add python py2-pip build-base python-dev libffi-dev openssl-dev sshpass && pip install ansible



docker run -d --name jenkins -v $PWD/data:/data -v /usr/lib64/libltdl.so.7:/usr/lib/x86_64-linux-gnu/libltdl.so.7 -v $PWD/jenkins_home:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):/usr/bin/docker -p 18080:8080 ci/jenkins:alpine


docker run -d --name jenkins -v $PWD/data:/data $PWD/jenkins_home:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock  -p 18080:8080 ci/jenkins:alpine
